﻿namespace WMS6.Web.InboundDetailServiceRef
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Runtime.Serialization;

    [Serializable, DebuggerStepThrough, GeneratedCode("System.Runtime.Serialization", "3.0.0.0"), DataContract(Name="BaseQuery", Namespace="http://schemas.datacontract.org/2004/07/WMS6.QueryEntity"), KnownType(typeof(ReceiptDetailQueryEntity))]
    public class BaseQuery : IExtensibleDataObject, INotifyPropertyChanged
    {
        [OptionalField]
        private string CurrentPageField;
        [NonSerialized]
        private ExtensionDataObject extensionDataField;
        [OptionalField]
        private bool IsGetAllField;
        [OptionalField]
        private string PageSizeField;
        [OptionalField]
        private string SortDirectionField;
        [OptionalField]
        private string SortFieldField;

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember]
        public string CurrentPage
        {
            get
            {
                return this.CurrentPageField;
            }
            set
            {
                if (!object.ReferenceEquals(this.CurrentPageField, value))
                {
                    this.CurrentPageField = value;
                    this.RaisePropertyChanged("CurrentPage");
                }
            }
        }

        [Browsable(false)]
        public ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [DataMember]
        public bool IsGetAll
        {
            get
            {
                return this.IsGetAllField;
            }
            set
            {
                if (!this.IsGetAllField.Equals(value))
                {
                    this.IsGetAllField = value;
                    this.RaisePropertyChanged("IsGetAll");
                }
            }
        }

        [DataMember]
        public string PageSize
        {
            get
            {
                return this.PageSizeField;
            }
            set
            {
                if (!object.ReferenceEquals(this.PageSizeField, value))
                {
                    this.PageSizeField = value;
                    this.RaisePropertyChanged("PageSize");
                }
            }
        }

        [DataMember]
        public string SortDirection
        {
            get
            {
                return this.SortDirectionField;
            }
            set
            {
                if (!object.ReferenceEquals(this.SortDirectionField, value))
                {
                    this.SortDirectionField = value;
                    this.RaisePropertyChanged("SortDirection");
                }
            }
        }

        [DataMember]
        public string SortField
        {
            get
            {
                return this.SortFieldField;
            }
            set
            {
                if (!object.ReferenceEquals(this.SortFieldField, value))
                {
                    this.SortFieldField = value;
                    this.RaisePropertyChanged("SortField");
                }
            }
        }
    }
}

